<template>
    <!-- // SEQ_VOLTE基础性能_小区(天) -->
    <index-card :indexCardTitle="indexCardTitle">
        <el-table :data="tableData" v-loading="loading">
            <el-table-column prop="starttime" label="开始时间" min-width="200">
                <template #default="scope">
                    {{ scope.row.starttime ? formatDateNormal(scope.row.starttime) : null }}
                </template>
            </el-table-column>
            <el-table-column prop="cgi" label="小区CGI" min-width="200" />
            <el-table-column prop="cellName" label="小区名称" min-width="200" />
            <el-table-column prop="cityName" label="地市名称" min-width="200" />
            <el-table-column prop="volteS1uUlFailRate" label="VOLTE上行RTP丢包率(%)" min-width="200" />
            <el-table-column prop="volteS1uDlFailRate" label="VOLTE下行RTP丢包率(%)" min-width="200" />
            <el-table-column prop="volteV2allMosUlTotal" label="上行MOS总和V2ALL" min-width="200" />
            <el-table-column prop="volteV2allMosUlRate" label="上行MOS值V2ALL(%)" min-width="200" />
            <el-table-column prop="volteV2allMosDlTotal" label="下行MOS总和V2ALL" min-width="200" />
            <el-table-column prop="volteV2allMosDlRate" label="下行MOS值V2ALL(%)" min-width="200" />
            <el-table-column prop="volteV2allMosUlU3" label="上行MOS大于3次数V2ALL" min-width="200" />
            <el-table-column prop="volteV2allMosUlU3Rate" label="上行MOS大于3占比V2ALL(%)" min-width="200" />
            <el-table-column prop="volteV2allMosDlU3" label="下行MOS大于3次数V2ALL" min-width="200" />
            <el-table-column prop="volteV2allMosDlU3Rate" label="下行MOS大于3占比V2ALL(%)" min-width="200" />
            <el-table-column prop="volteV2vMosTotal" label="MOS总和V2V" min-width="200" />
            <el-table-column prop="volteV2vMosRate" label="MOS值V2V(%)" min-width="200" />
            <el-table-column prop="erabSuccQci1" label="QCI=1的Erab建立成功次数" min-width="200" />
            <el-table-column prop="v2vDxUlSlice" label="上行断续的切片单据数" min-width="200" />
            <el-table-column prop="v2vUlSlice" label="上行总切片单据数" min-width="200" />
            <el-table-column prop="v2vDxUlSliceRate" label="VOLTE上行断续质差率(%)" min-width="200" />
            <el-table-column prop="volteMoVoTTotal" label="VOLTE语音始呼接通话务量总时长(ms)" min-width="200" />
            <el-table-column prop="volteMtVoTTotal" label="VOLTE语音终呼接通话务量总时长(ms)" min-width="200" />
            <el-table-column prop="volteVoTraffic" label="VOLTE语音接通话务量(Erl)" min-width="200" />
        </el-table>
    </index-card>
</template>

<script setup>
import { ref } from "vue";
import { apiCommon, formatDateNormal } from "@/utils/index.js";
import * as qualityApi from "@/api/biz/networkQuality";
import mittBus from "@/utils/mittBus"; // mitt事件总线

mittBus.on("get4GIndexItemData", (params) => {
    getData(params)
});

const props = defineProps({
    indexCardTitle: {
        type: String,
        default: '',
    },
    rowsData: {
        type: Object,
        default: () => { },
    },
});

const tableData = ref([]);
let loading = ref(false);

const getData = async (params) => {
    // console.log('params', params)

    loading.value = true;
    tableData.value = await apiCommon(qualityApi.getSeqVolteDailyList, params);
    tableData.value = tableData.value.data;
    loading.value = false;
}

getData(props.rowsData);
</script>